<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>

<html>
    <head>
    	<%@ include file="/WEB-INF/views/include/common.jsp" %>
		<meta name="AUTHOR" content="QroTech Inc." />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
		<meta http-equiv="PRAGMA" content="NO-CACHE">
		<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>큐로넷::위치관제서비스</title>
		<link href="${cssUrl}/Qronet_login.css" rel="stylesheet" media="screen" />
    </head>
    <body onload="javascript:init();">
    	<div class="loginWrapper">
    		<div class="login_box">
    			<div class="login_logo">
    				<img src="${imgUrl}/login-logo.png"> 
    			</div>
    			<div class="login_text_box">
    				<div class="login_text">
    					<form id="form" action="j_spring_security_check" method="post">
	    				
	    				<p><input type="text" name="j_username" id="j_username"></p>
	    				<p><input type="password" name="j_password" onkeypress="return runScript(event)" ></p>
	    				</form>
	    			</div>
	    			<div class="login_button"><a onclick="javascript:doLogin();"><img src="${imgUrl}/login_text.png"></a></div>
    			</div>
    			<div class="magnifier">
    				<img src="${imgUrl}/magnifier.png">
    				<a href="#"><img class="fix_height" src="${imgUrl}/searchForIdPass.png"></a>
    			</div>
    			
    		</div>
    		
   		 </div>
		
<script type="text/javascript">
function init(){
	$('#j_username').focus();	
	var msg ='<c:out value="${msg}"/>';
	if(msg.length>0){
		alert(msg);
	}
}
function runScript(e) {
    if (e.keyCode == 13) {
    	doLogin();
        return false;
    }
}
function doLogin() {
	
	$('form').submit();
	return;
	$('form').submit();
	return;
	var LoginID = $('#LoginID').val();
	var LoginPW = $('#LoginPW').val();
	
	if (LoginID == "") {
		alert('아이디를 입력하세요.');
		$('#LoginID').focus();
		return;
	}
	if (LoginPW == "") {
		alert('비밀번호를 입력하세요.');
		$('#LoginPW').focus();
		return;
	}
	var param = $('#form').serialize();
	var url="login.json";
	AjaxPost(url, param, function(data){
		if(data.msg != ''){
			alert(data.msg);
		} else {
			$(location).attr('href', '/totalCarListMain');
		}
	}); 
}
</script>
    </body>
</html>

